
/// 创建时间：2024/1/29
/// 作者：wangjianhua
/// 描述：

class SetModel {
  late String title;
  late bool switchStatue;
}

SetModel initSetModel(String title, bool switchStatue) {
  SetModel set = SetModel();
  set.title = title;
  set.switchStatue = switchStatue;
  return set;
}

List<SetModel> getSetModels() {
  //
  // final db = sqlite3.open('setfile');
  //
  // // Create a table and insert some data
  // db.execute('''
  //   CREATE TABLE notification_set (
  //     id INTEGER NOT NULL PRIMARY KEY,
  //     title TEXT NOT NULL,
  //     switchStatue TEXT NOT NULL,
  //   );
  // ''');
  // // Prepare a statement to run it multiple times:
  // final stmt = db.prepare('INSERT INTO notification_set (title) VALUES (?)');
  // stmt
  //   ..execute(['通知开关'])
  //   ..execute(['每日提醒']);
  // // Dispose a statement when you don't need it anymore to clean up resources.
  // stmt.dispose();

  // final ResultSet resultSet = db.select('SELECT * FROM notification_set WHERE');
  // for (final Map row in resultSet) {
  //   print('Artist[id: ${row['id']}, title: ${row['name']}]');
  // }
  //
  //
  // // Don't forget to dispose the database to avoid memory leaks
  // db.dispose();

  List<SetModel> sets = [];
  for (Map dic in [
    {'t': '通知开关', 's': false},
    {'t': '每日提醒', 's': false}
  ]) {
    SetModel model = initSetModel(dic['t'], dic['s']);
    sets.add(model);
  }

  return sets;
}
